package model;

import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Transient;

import com.googlecode.objectify.*;

public class EventMsg {
	@Id Long id;
	Key<EventInfo> event;
	Key<UserProfile> user;
	
	String msg;
	Date createtime;
	@Transient String username;
	
	public EventMsg() {
	}
	
	public EventMsg(long eid, String uid, String msg) {		
		event = new Key<EventInfo>(EventInfo.class, eid);
		user = new Key<UserProfile>(UserProfile.class, uid);
		this.msg = msg;
		createtime = new Date();
	}
	public Key<UserProfile> getUser() {
		return user;
	}

	public void setUser(Key<UserProfile> user) {
		this.user = user;
	}
	
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
}
